<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * Class UserGrade
 *
 * @package App\Model
 * @property-read \App\Model\VipFeeConfig $vipFeeConfig
 * @mixin \Eloquent
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade query()
 * @property int $id
 * @property int $user_id 会员id
 * @property float|null $last_money 充值递减下次应付金额
 * @property int $vip_fee_config_id 会员等级id
 * @property string $vip_fee_config_comment 会员等级描述
 * @property \Illuminate\Support\Carbon|null $created_at 创建时间
 * @property \Illuminate\Support\Carbon|null $updated_at 修改时间
 * @property string|null $overed_at 到期时间
 * @property string|null $last_at 递减最后到期时间
 * @property string|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereLastAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereLastMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereOveredAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereVipFeeConfigComment($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserGrade whereVipFeeConfigId($value)
 */
class UserGrade extends Model
{
    protected  $table='user_grade';

    public function vipFeeConfig()
    {
        return $this->hasOne(VipFeeConfig::class, 'id', 'vip_fee_config_id');
    }

}
